<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %>
<%@ include file="/common/taglibs.jsp"%>
<html>
	<head>
		<title>
			<fmt:message key="info_bind_${param.actionType }"></fmt:message>
		</title>
		<script type="text/javascript" src="${ctx }/scripts/plugins/date/timer.js"></script>
		<script type="text/javascript" src="${ctx }/scripts/rollbook/userinfo/userinfo.js"></script>
	</head>
	<body>
		<div class="container_16">
			<div class="grid_3">
				<jsp:include page="/common/menu_2.jsp"/>
			</div>
			<div class="grid_${currentRole.roleType.id eq 4 ? '13 omega' : '10 alpha omega' }">
				<div class="content_top">
					<div class="left">
						<img src="${ctx }/images/bind.png" />
					</div>
					<div class="right">
						<h7>${currentRole.roleType.id eq 4 ? "企业" : "个人" }设置 > <fmt:message key="info_bind_${param.actionType }"></fmt:message><h7/>
					</div>
					<div id="divTime" class="time">
				        <label id="lblDate"></label>
				        <label id="lblTime"></label>
				     </div>
				</div>
				<div class="content_bottom">
					<div class="reg_middle reg">
						<p></p>
						<c:choose>
							<c:when test="${param.actionType eq 1}">
								<table cellspacing="0" cellpadding="0" style="width: 520px;">
									<tr>
										<td colspan="2" style="padding-top: 10px;">
											申请您想要加入的团体或企业，并进行绑定。
										</td>
									</tr>
									<tr>
										<td style="width: 200px;">
											<input class="input" type="text" id="deptName" name="deptName" value="请输入团体或企业名称" />
										</td>
										<td>
											<label class="btn"><input type="button" value="查询" onclick="searchDept()" /></label>
										</td>
									</tr>
									<tr>
										<td colspan="2" style="padding-top: 10px;">
											<hr />
										</td>
									</tr>
								</table>
								<c:if test="${status eq 2}">
									<table cellpadding="0" cellspacing="0" style="width: 520px;margin-top: -20px;">
										<tr>
											<td>
												您已经成功绑定到
												<font color="#1465B7">${currentDept.department eq null ? currentDept.displayName : currentDept.department.displayName }</font>
											</td>
										</tr>
									</table>
								</c:if>
								<div id="company" style="width: 520px;text-align: center;display: none;">
			                		<img alt="" src="${ctx }/images/loading.gif">
								</div>
							</c:when>
							<c:otherwise>
								<jsp:include page="roleList.jsp"></jsp:include>
							</c:otherwise>
						</c:choose>
						<p></p>	
						<p></p>
					</div>	
				</div>
			</div>
			<c:if test="${currentRole.roleType.id ne 4 }">
				<jsp:include page="../sitecontent/appInfo.jsp"></jsp:include>
			</c:if>
		</div>
		<div class="container_16" style="margin-top: 50px;">
			<p></p>
		</div>
	</body>
</html>